from django.db import models
from monitor.models import *

# Create your models here.

class Service(models.Model):
	name = models.CharField(max_length=64)
#	port = models.IntegerField(max_length=5, null=True,blank=True)
	plugin = models.CharField(max_length=20)
	args = models.CharField(max_length=100,null=True,blank=True)
	status = models.IntegerField(max_length=1,default=3)#0:ok,1:warning,2:critical,3:error
        update_interval = models.IntegerField(max_length=10, null=True, default=5)
	items = models.ManyToManyField(Items)
	def __unicode__(self):
		return self.name
